<script>
export default {
  name: "filterPage",
  data() {
    return {
      msg: '今天天气很好',
      value:'',
    }
  },
  methods:{
    getValue(){
      console.log(this.value)
    }
  },
  filters:{
    filterM(data,format){
      console.log(data)
      console.log(format)
      // return data.toString().replace('1',4)
      return data.replace('今天','昨天')

    }
  }
}

</script>

<template>
  <div>
    {{msg|filterNum(111) }}
    {{msg|filterM('/')}}
    <input type="text" @change="getValue" v-model="value">
  </div>
</template>

<style scoped lang="less">

</style>